<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="templates/templateRestaurateur.xhtml">
	<ui:define name="pageHeader">
	    Console RESTAURATEUR
	    <br />

	</ui:define>

	<ui:define name="body">
		<h:form>
			<div>
				<br /> <span>Ajout nouveau Produit</span> <br />
				<br />
			</div>

			<div>
				<table>
					<tr>
						<td><span>Nom :</span></td>
						<td><h:inputText id="nom" styleclass="box"
								value="#{gestionProduitsMB.nom}" required="true"
								requiredMessage="nom manquant" /> <h:message for="nom" /></td>
					</tr>
					<tr>
						<td><span>Description :</span></td>
						<td><h:inputText id="description" styleclass="box"
								value="#{gestionProduitsMB.description}" required="true"
								requiredMessage="description manquante" /> <h:message
								for="description" /></td>
					</tr>
					<tr>
						<td><span>Prix :</span></td>
						<td><h:inputText id="prix" styleclass="box"
								value="#{gestionProduitsMB.prix}" required="true"
								requiredMessage="prix manquant" /> <h:message for="prix" /></td>
					</tr>
					<tr>
						<td><span>Quantite :</span></td>
						<td><h:inputText id="quantite" styleclass="box"
								value="#{gestionProduitsMB.quantite}" required="true"
								requiredMessage="quantite manquante" /> <h:message
								for="quantite" /></td>
					</tr>
					<tr>
						<td><span>Date fin validite :</span></td>
						<td><h:inputText id="dateFinValidite" styleclass="box"
								value="#{gestionProduitsMB.dateFinValidite}" required="true"
								requiredMessage="Date manquante" >
								<h:message style="color:red" for="dateFinValidite" />
								<f:convertDateTime pattern="dd/MM/yyyy" />
							</h:inputText>
						</td>

					</tr>
				</table>
			</div>
			<br />
			<br />

			<h:commandButton value="Ajouter produit"
				action="#{gestionProduitsMB.doAjouterProduit}"
				style="width: 100px; height: 25px" />
			<br />
			<br />

		</h:form>
	</ui:define>
</ui:composition>
</html>